public class Ex5_1{
	public static void main(String[] args){
		int count = 0;
		for (int i = 1; i <= 100; i++){
			System.out.printf("%6d", getPentagonalNumber(i));
			if (++count % 10 == 0)
				System.out.printf("\n");
		}
	}

	public static int getPentagonalNumber(int n){
		return n * (3*n - 1) / 2;
	}
}
